import React from 'react';
import {BrowserRouter as Router, Route, Switch, Link} from 'react-router-dom';
import Home from '../pages/Home/Home';
import TempList from '../pages/TempList/TempList';
import TempDesgin from '../pages/TempDesgin/TempDesgin';


const getRouter = () => {
    return (
        <Router>
            <div>
                <ul>
                    <li><Link to="/">首页</Link></li>
                    <li><Link to="/tempList">模板列表</Link></li>
                    <li><Link to="/tempDesgin">模板设计</Link></li>
                </ul>
                <Switch>
                    <Route exact path="/" component={Home}></Route>
                    <Route path="/tempList" component={TempList}></Route>
                    <Route path="/tempDesgin" component={TempDesgin}></Route>
                </Switch>
            </div>
        </Router>
    )
}

export default getRouter;